<!--header-->
<!--# include virtual="/ceca_two/common/html/header.html"-->
<link rel="stylesheet" href="/ceca_two/css/supplierInfomation.css" />
<link rel="stylesheet" href="/ceca_two/css/construction.css" />
<style>
    .layer-anim {
        width: 625px !important;
    }
    .gjss{
        float: right;
        background: #ff3030;
        color: #fff;
        padding: 0 20px;
        margin-right: 53px;
        cursor: pointer;
    }
    .tableul li{
    	border-left: 1px solid #ccc;
    	text-align: center;
    }
    .tableul li:first-child{
    	border-left: 0px solid #ccc;
    	text-align: center;
    }
</style>
<!--banner-->
<!--# include virtual="/ceca_two/common/html/banner.html"-->
<div class="content">
    <h1 style="font-size: 24px;text-align: center;margin: 50px 0;">每平米消耗量查询结果</h1>
    <!--
    <div class="navClassify">
        <div class="allClassift">
        </div>
        <div class="ClassiftForm">
            <input type="text" name="" id="gcmc" value="" class="ClassiftInput" placeholder="请输入您要搜索的工程名称"/>
            <button class="ClassiftBtn">搜索</button>
            <button class="searchBtn searchListPrice">查询清单单价</button>
            <button class="searchBtn searchMeterPrice">查询每平米消耗量</button>
        </div>
    </div>

    <div class="classifyNav">
        <ul class="result clearfloat" >
            <li class="allresult" style="margin-bottom: 0">搜索条件</li>
            <li class="last" onclick="window.location.href='/ceca_two/modules/costnorm/construction.html'">清空筛选结果</li>
        </ul>
        <div class="nature jzfl">
            <p class="useNature">编制时间</p>
            <ul class="natureUl">
                <li>2018年</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">地区</p>
            <ul class="natureUl">
                <li>北京市</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">结构类型</p>
            <ul class="natureUl">
                <li>剪力墙结构</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">总建筑面积</p>
            <ul class="natureUl">
                <li>2000</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">建筑总高度</p>
            <ul class="natureUl">
                <li>81.2</li>
            </ul>
        </div>
    </div>
    <div class="advanced clearfloat layui-form">
        <div class="fl">高级筛选</div>
        <div class="fr">
            <div class="layui-form-item">
                <label class="layui-form-label">编制时间</label>
                <div class="layui-input-inline">
                    <input type="text" name="date" id="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" readonly="">
                </div>
                <label class="layui-form-label">结构类型</label>
                <div class="layui-input-inline" id="jglx">
                    <select name="quiz1">
                        <option value="">请选择结构类型</option>
                        <option value="框架结构">框架结构</option>
                        <option value="剪力墙结构">剪力墙结构</option>
                        <option value="框架-剪力墙结构">框架-剪力墙结构</option>
                        <option value="筒体结构">筒体结构</option>
                        <option value="部分框支剪力墙结构">部分框支剪力墙结构</option>
                        <option value="板柱-剪力墙结构">板柱-剪力墙结构</option>
                        <option value="钢结构">钢结构</option>
                        <option value="砖混结构">砖混结构</option>
                        <option value="其他结构">其他结构</option>
                    </select>
                </div>
                <label class="layui-form-label">地上层数</label>
                <div class="layui-input-inline" id="dscs">
                    <select name="quiz2">
                        <option value="">请选择地上层数</option>
                        <option value="0~10层">0~10层</option>
                        <option value="11~20层">11~20层</option>
                        <option value="21~30层">21~30层</option>
                        <option value="31~40层">31~40层</option>
                        <option value="41~50层">41~50层</option>
                        <option value="50层以上">50层以上</option>
                    </select>
                </div>
                <label class="layui-form-label">地下层数</label>
                <div class="layui-input-inline" id="dxcs">
                    <select name="quiz3">
                        <option value="">请选择地下层数</option>
                        <option value="0~2层">0~2层</option>
                        <option value="3~4层">3~4层</option>
                        <option value="4层以上">4层以上</option>
                    </select>
                </div>
                <label class="layui-form-label">造价类别</label>
                <div class="layui-input-inline" id="zjlb">
                    <select name="quiz4">
                        <option value="">请选择造价类别</option>
                        <option value="全过程造价咨询">全过程造价咨询</option>
                        <option value="最高投标限价">最高投标限价</option>
                        <option value="竣工结算">竣工结算</option>
                        <option value="标底价">标底价</option>
                        <option value="投标价">投标价</option>
                        <option value="合同价">合同价</option>
                        <option value="设计概算">设计概算</option>
                        <option value="施工图预算">施工图预算</option>
                        <option value="经济评价">经济评价</option>
                        <option value="投资估算">投资估算</option>
                        <option value="工程造价鉴定">工程造价鉴定</option>
                        <option value="全过程工程咨询">全过程工程咨询</option>
                        <option value="竣工决算">竣工决算</option>
                    </select>
                </div>

                <div class="gjss">高级搜索</div>

            </div>
        </div>
    </div>
    -->
    <div class="screen">
        <div class="screenList" id="screenList"></div>
        <div id="fyq" style="text-align:center;margin:20px 0px"></div>
    </div>
</div>
<!--底部-->
<!--# include virtual="/ceca_two/common/html/footer.html"-->
<script type="text/html" id="allList">
    <div class="meterList">
        {{# for (var i = 0 ; i < d.length ; i++){ }}
            <div class="tableHead clearfloat nav1">
                <ul>编制时间</ul>
                <ul>地区</ul>
                <ul>工程名称</ul>
                <ul>结构类型</ul>
                <ul>总建筑面积</ul>
                <ul>建筑总高度</ul>
            </div>
            <div class="tableBody clearfloat body1">
                <ul class="tableul">
                    <li>{{d[i].result[0].compilationTime}}</li>
                    <li>{{d[i].result[0].address1}}</li>
                    <li>{{d[i].result[0].costName}}</li>
                    <li>{{d[i].result[0].structureType}}</li>
                    <li>{{d[i].result[0].totalArea}}</li>
                    <li>{{d[i].result[0].total}}</li>
                </ul>
            </div>
            <div class="tableHead clearfloat nav2">
                <ul>清单编码</ul>
                <ul>项目名称</ul>
                <ul>项目特征描述</ul>
                <ul>每平米消耗量(工程量/建筑总面积)</ul>
            </div>
            <div class="tableBody clearfloat body2">
            	{{# var totalAmount =0 }}
                {{# for (var j = 0 ; j < d[i].result.length ; j++){ }}
                    <ul class="tableul">
                        <li>{{d[i].result[j].code}}</li>
                        <li>{{d[i].result[j].name}}</li>
                        <li>{{d[i].result[j].description}}</li>
                        <li>{{d[i].result[j].amount/d[i].result[j].totalArea}}</li>
                        {{# totalAmount += d[i].result[j].amount/d[i].result[j].totalArea }}
                    </ul>
                {{#  } }}
                <ul class="tableul">
                    <li style="float: right;">总消耗量 ：{{totalAmount}} </li>
                </ul>
            </div>
        {{#  } }}
    </div>
</script>
<script type="text/javascript">
    layui.use(['construction','layer',"Router",'laytpl','laypage','Zutil','form'], function() {
        var Zutil  =layui.Zutil;
        var Router = layui.Router;
        var laytpl= layui.laytpl;
        var laydate= layui.laydate;
        var layer = layui.layer;
        var laypage =layui.laypage;
        var form = layui.form;
        var listObj = {};
        listObj.pageNumber = Zutil.getQueryString("pageNumber") || 1;
        listObj.pageSize = Zutil.getQueryString("pageSize") || 10;
    	Zutil.getQueryString("structureType") ? listObj.structureType = Zutil.decodeURI(window.atob(Zutil.getQueryString("structureType"))) : "" ;
    	Zutil.getQueryString("catalogOne") ? listObj.catalogOne = Zutil.decodeURI(window.atob(Zutil.getQueryString("catalogOne"))).split("_")[0] : "" ;
    	Zutil.getQueryString("catalogSecond") ? listObj.catalogSecond = Zutil.decodeURI(window.atob(Zutil.getQueryString("catalogSecond"))).split("_")[0] : "" ;
    	Zutil.getQueryString("address1") ? listObj.address1 = Zutil.decodeURI(window.atob(Zutil.getQueryString("address1"))) : "" ;
    	Zutil.getQueryString("compilationTime") ? listObj.compilationTime = Zutil.decodeURI(window.atob(Zutil.getQueryString("compilationTime"))) : "" ;
    	Zutil.getQueryString("code") ? listObj.code = Zutil.decodeURI(window.atob(Zutil.getQueryString("code"))) : "" ;

        $(".searchListPrice").on("click",function () {
            layer.open({
                type: 2,
                title: '查询清单单价',
                shadeClose: true,
                shade: false,
                maxmin: true,
                area: ['893px', '560px'],
                content: '/ceca_two/modules/costnorm/base/searchListPrice.html'
            })
        });
        $(".searchMeterPrice").on("click",function () {
            layer.open({
                type: 2,
                title: '查询每平米消耗量',
                shadeClose: true,
                shade: false,
                maxmin: true,
                area: ['893px', '560px'],
                content: '/ceca_two/modules/costnorm/base/searchMeterPrice.html'
            })
        });
        // 列表渲染
        filterList(listObj);
        function filterList(obj){
            $.post("/guidance_service/front/data/info/groupDataInfo.do",obj,function(result){
                var data = result.data;
                var list = allList.innerHTML;
                laytpl(list).render(data.list, function(html){
                    $("#screenList").html(html);
                });
                laypage({
                    cont: 'fyq'
                    ,pages: data.totalPage
                    ,curr:data.pageNumber
                    ,groups:data.pageSize
                    ,skin: '#ff0000'
                    ,jump: function(opt, first){
                        var curr = opt.curr;   //当前的页码
                        listObj.pageNumber = curr|| 1;
                        if(!first)filterList(obj);
                    }
                });
            })
        }
    });
</script>
</body>
</html>
